#ifndef __MAIN_H
#define __MAIN_H

/* i80_Control Example

   本人已经将i80封装好,需要驱动不同的8080修改初始化即可
   (PS:若遇到特殊情况请自己解决)
   .................................................
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "sdkconfig.h"
/*lvgl*/
#include "lvgl.h"
#include "lv_demos.h"
/*freeRTOS*/
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "esp_freertos_hooks.h"
#include "esp_timer.h"
/*LVGL_Ports*/
#include "i80_lcd.h"
#include "my_lv_port_indev.h"
/*Display_Port*/
#include "lv_port_disp.h"
#include "lv_port_tick.h"
/*My_GUI*/
#include "ui.h"
#include "ui_helpers.h"
/*ntp*/
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_attr.h"
#include "esp_sleep.h"
#include "nvs_flash.h"
#include "protocol_examples_common.h"
#include "esp_sntp.h"
#include "sntp_custom.h" //init code
/*temperature_sensor*/
#include "driver/temperature_sensor.h"
/*sdcard*/
#include <sys/unistd.h>
#include <sys/stat.h>
#include "esp_vfs_fat.h"
#include "sdmmc_cmd.h"
#include "driver/sdmmc_host.h"

/***define***/
#define LVGL_TICK_PERIOD_MS 2

#define SNTP_LOG 0
#define AIDA64_LOG 0

// SemaphoreHandle_t xGuiSemaphore;

/***num***/
struct TimeSntp
{
   int year;
   int month;
   int mday;
   int day;
   int hour;
   int min;
   int sec;
} NTP;

/* Http begin define */
#define WEB_SERVER "192.168.1.9" //电脑或者路由器的Ipv4 
#define WEB_PORT "80"              //端口
#define WEB_PATH "/sse"            // ADIA需要sse即可
static const char *REQUEST = "GET " WEB_PATH " HTTP/1.0\r\n"
                             "Host: " WEB_SERVER ":" WEB_PORT "\r\n"
                             "User-Agent: esp-idf/1.0 esp32\r\n"
                             "\r\n";
int funcCount = 8; //轮询计数解析数据
/* Http end define */

/* Reset begin define */
int SystemReset = 20;//10分钟复位一次
/* Reset end define */

/* My PC data (struct)*/
struct PC
{
   int16_t cpuFrequence;
   int16_t cpuUsage;
   int16_t cpuTemp;
   int16_t ramUsage;
   int16_t ramAvaliable;
   int16_t ssd1Used;
   int16_t ssd2Used;
   float NIC1DownSpeed;
} myPc;

/* SD Card data */
#define MOUNT_POINT "/sdcard"

#endif